import cart from '../../../../store/cart'
import {
  storeBindingsBehavior
} from 'mobx-miniprogram-bindings'
Component({
  behaviors: [storeBindingsBehavior],
  storeBindings: [{
    store: cart,
    fields: ['dinnerList'],
  }, ],
  data: {
    showChoose: false
  },
  methods: {
    open() {
      this.setData({
        showChoose: true
      })
    },
    close(){
      this.setData({showChoose:false})
    },
    choose(e){
      let {item} = e.currentTarget.dataset
      this.triggerEvent('chooseDinner',{item})
      this.close()
    }
  }
})